package com.example.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.mapper.SysUserMapper;
import com.example.modal.SysUser;
import com.example.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author jie
 * @date 2021/11/18 -10:14
 */
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService {

    @Autowired
    private SysUserMapper sysUserMapper;

    @Override
    public int insert(SysUser user) {
        return sysUserMapper.insert(user);
    }

    @Override
    public int delete(String id) {
        return sysUserMapper.deleteById(id);
    }

    @Override
    public int update(SysUser user) {
        return sysUserMapper.updateById(user);
    }

    @Override
    public SysUser get(String id) {
        return sysUserMapper.selectById(id);
    }

    @Override
    public List<SysUser> fetchAll() {
        return sysUserMapper.selectList(null);
    }

    @Override
    public List<SysUser> page() {
        return null;
    }
}